package com.michaelbulava.TFS.ui.helpers;

import javax.swing.*;

/**
 * Created by mbulava on 6/15/2015.
 */
public class SystemIconHelper {
    public static final int ERROR_ICON = 1;
    public static final int WARNING_ICON = 8;
    public static final int INFO_ICON = 2;
    public static final int QUESTION_ICON = 4;

    public static Icon getErrorIcon(){
        return getSystemIcon(ERROR_ICON);
    }

    public static Icon getWarningIcon(){
        return getSystemIcon(WARNING_ICON);
    }

    public static Icon getInfoIcon(){
        return getSystemIcon(INFO_ICON);
    }

    public static Icon getQuestionIcon(){
        return getSystemIcon(QUESTION_ICON);
    }

    public static Icon getSystemIcon(final int imageId){
        switch(imageId){
            case ERROR_ICON:
                return com.intellij.openapi.ui.Messages.getErrorIcon();
            case WARNING_ICON:
                return com.intellij.openapi.ui.Messages.getWarningIcon();
            case INFO_ICON:
                return com.intellij.openapi.ui.Messages.getInformationIcon();
            case QUESTION_ICON:
                return com.intellij.openapi.ui.Messages.getQuestionIcon();
            default:
                return com.intellij.openapi.ui.Messages.getInformationIcon();
        }

    }
}
